package top.yudoge.dogeeditorserverj.common.utils;

import cn.hutool.core.util.StrUtil;

import java.util.List;
import java.util.Map;
import java.util.Objects;

public class CommonUtil {
    public static boolean isAnyBlank(String... strings) {
        for (String s : strings) {
            if (StrUtil.isBlank(s)) {
                return true;
            }
        }
        return false;
    }

    public static <T> boolean notIn(T t, T...ts) {
        for (T tInTs : ts) {
            if (t == tInTs) {
                return false;
            }

            if (Objects.isNull(t) || Objects.isNull(tInTs)) return false;

            if (t.equals(tInTs)) return false;
        }

        return true;
    }

    public static <T> List<T> values(Map<?, T> map) {
        return map.values().stream().toList();
    }
}
